strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * From Win32_PerfFormattedData_PerfOS_System")
 
For Each objOS in colOperatingSystems
    intSystemUptime = Int(objOS.SystemUpTime / 60)
    if intSystemUptime >=60 then
        uptime_hour = Int(intSystemUptime / 60)
        uptime_minute = intSystemUptime-(uptime_hour*60)
        if uptime_hour >= 24 then
            uptime_day = Int(uptime_hour / 24)
            uptime_hour = uptime_hour-(uptime_day*24)
            wscript.echo """"&uptime_day&" days "&uptime_hour&" hours "&uptime_minute&" minutes"""
         else
             wscript.echo """"&uptime_hour&" hours "&uptime_minute&" minutes"""
         end if
    else
        wscript.echo """"&intSystemUptime&" minutes"""
    end if
Next